package com.colin.util.exception;

import com.colin.util.enums.ResponseStatusEnum;

public class BusiException extends RuntimeException {
    private static final long serialVersionUID = -1211634407343596671L;

    private String code;
    private String message;
    private Object data;

    public BusiException(){
        super();
    }

    public BusiException(String message) {
        super(message);
        this.code = ResponseStatusEnum._400.getStatus();
        this.message = message;
    }

    public BusiException(String code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public BusiException(String code, String message, Object data) {
        super(message);
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public String getCode() {
        return code;
    }

    public Object getData() {
        return data;
    }
}
